﻿namespace Babylon.Primitives
{
    /// <summary>
    /// Textured ellipse
    /// </summary>
    public class TexturedEllipse : EllipseBase<VertexPositionNormalTexture>
    {
        public TexturedEllipse(float verticalRay, float horizontalRay, int verticalSubdivisions) : base(verticalRay,horizontalRay,verticalSubdivisions)
        {
        }
        protected override void BeforeCreatingVertices(float horizontalRay, float verticalRay, int subdivisions)
        {
        }

        protected override void AfterCreatingVertex(ref VertexPositionNormalTexture vertex, float normalizedZRot, float normalizedYRot)
        {
            vertex.TexCoords = new Microsoft.Xna.Framework.Vector2(normalizedYRot, normalizedZRot);
        }

        protected override VertexPositionNormalTexture CreateVertex()
        {
            return new VertexPositionNormalTexture();
        }

        protected override Microsoft.Xna.Framework.Graphics.VertexDeclaration GetVertexDeclaration()
        {
            return VertexPositionNormalTexture.GetVertexDeclaration();
        }
    }
}
